.jsonEditor {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;

  :global {
    .tree-lookup-input {
      font-size: 1em;
      position: relative;
      font-weight: 400;
      font-style: normal;
      color: rgba(0, 0, 0, 0.87);
    }

    .tree-lookup-input input {
      width: 100%;
      margin: 0;
      outline: 0;
      -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
      text-align: left;
      line-height: 1.21428571em;
      padding: 0.7em 1em;
      background: #fff;
      border: 1px solid rgba(34, 36, 38, 0.15);
      color: rgba(0, 0, 0, 0.87);
      border-radius: 0.28571429rem;
      -webkit-transition: box-shadow 0.1s ease, border.1s ease;
      transition: box-shadow 0.1s ease, border 0.1s ease;
      box-shadow: none;
      padding-right: 2.67142857em !important;
      margin-bottom: 7px;
    }
    .tree-lookup-input input {
      padding: 6px 12px;
    }
  }
}

.toolbar {
  background-color: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.body {
  background: #fff;
  padding: 16px;
}

.command {
  display: inline-block;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 15px;
}

.command:hover {
  background-color: #ecedec;
}

.wtree,
.wtree ul {
  // margin-left: 24px;
  padding: 0;
}
.wtree li {
  list-style-type: none;
  margin: 10px 0 10px 10px;
  position: relative;
}
.wtree li:before {
  content: '';
  position: absolute;
  top: -9px;
  left: -20px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid transparent;
  width: 20px;
  height: 15px;
}

.wtree li:last-child::before {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.wtree li:after {
  position: absolute;
  content: '';
  top: 5px;
  left: -20px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  width: 20px;
  height: 100%;
}
.wtree li:last-child:after {
  display: none;
}

.wtree .row {
  display: block;
  // border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 6px;
  color: #888;
  text-decoration: none;
  // background-color: #fafafa;
  cursor: unset !important;
  border-radius: 4px;
  :global(.ant-input),
  :global(.ant-checkbox),
  :global(.ant-select) {
    display: inline-block;
    margin-right: 8px;
    width: 200px;
    // border: none;
  }

  :global(.ant-select) {
    width: 90px;
    :global(.ant-select-selection) {
      // border: none;
    }
  }
  :global(.ant-checkbox) {
    width: auto;
  }

  .action {
    cursor: pointer;
    margin-right: 12px;

    &.setting {
      color: #00a854;
    }
    &.delete {
      color: #ff561b;
    }
    &.add {
      color: #2395f1;
    }
    &.copy {
      color: #9254de;
    }
  }
  &:hover {
    background: #e6f7ff;
  }
  > span {
    position: relative;
    display: block;
  }
}
.wtree li span.row:hover,
.wtree li span.row:focus,
.wtree li span.row:hover + ul li span.row,
.wtree li span.row:focus + ul li span.row {
  background: #e6f7ff;
  // color: #000;
  // border: 1px solid #aaa;
}

.wtree li span.row:hover + ul li:after,
.wtree li span.row:hover + ul li:before,
.wtree li span.row:focus + ul li:after,
.wtree li span.row:focus + ul li:before {
  border-color: #aaa;
}

// .wtree > li > span.row {
//   background-color: #bae7ff;
// }

// .wtree > li > ul > li > span.row {
//   background-color: #f4ffb8;
// }

// .wtree > li > ul > li > ul > li > span.row {
//   background: #d9f7be;
// }

.wtree-switcher {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  position: absolute;
  z-index: 1;
  /*  margin: 0 1em 0 -2em;*/
  /*    left: 50%;
top:50%;*/
  margin-top: -9px;
  margin-left: -33px;
  width: 16px;
  height: 16px;
  border-radius: 16px;
  /*content: '+';*/
  text-align: center;
  line-height: 16px;
  cursor: pointer;

  &:hover {
    background: #000;
  }
}

.wtree .row :global(.ant-input).nodeName {
  width: 500px;
}

.advFooter {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  border-top: 1px solid #e9e9e9;
  padding: 10px 16px;
  background: #fff;
  text-align: right;
}
.advRow {
  margin-bottom: 4px;
}
.advLabel {
  text-align: right;
  padding-right: 8px;
  padding-top: 2px;
  &::after {
    content: ':';
    position: relative;
    top: -0.5px;
    margin: 0 8px 0 2px;
  }
}

.wtree-open {
  width: 10px;
  &::before {
    width: 0px;
    height: 0px;
    border-top: 10px solid red;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    content: '';
  }
}

.switcher {
  cursor: pointer;
  padding: 0 4px;
  position: absolute;
  top: 0;
  left: -24px;

  &:hover {
    color: #000;
  }
}

.block {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  padding: 8px;
  background-color: #fbfbfb;
  border: 1px solid #e8e8e8;
  margin-bottom: 8px;

  > .counter {
    display: block;
  }
}

.counter {
  display: block;
  position: absolute;
  width: 60px;
  height: 60px;
  right: -20px;
  top: -20px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  color: rgba(0, 0, 0, 0.5);
  padding-left: 20px;
  padding-top: 26px;
  cursor: pointer;
  z-index: 1;
  .num {
    display: block;
  }
  .delete {
    display: none;
  }

  &:hover {
    background-color: rgba(0, 0, 0, 0.1);
    padding-left: 16px;
    .num {
      display: none;
    }
    .delete {
      display: block;
    }
  }
}

.flex {
  display: flex;
  align-items: center;
  // background-color: #fbfbfb;
  // margin-bottom: 4px;
  // border: 1px solid #e8e8e8;
  padding: 10px;
  // border-radius: 4px;

  > * {
    margin-right: 8px;
  }

  .label {
    flex-basis: 100px;
  }

  .item:not(:last-child) {
    margin-right: 24px;
  }
  .action {
    flex-basis: 28px;
    &:hover {
      color: red;
    }
  }

  .edit {
    &:hover {
      color: #00a854;
    }
  }
}

.icon {
  font-size: 10px;
  margin-right: 6px;
}

.boolean {
  color: rgb(174, 129, 255);
}

.number {
  color: rgb(166, 226, 46);
}

.integer {
  color: rgb(166, 226, 46);
}

.double {
  color: rgb(166, 226, 46);
}

.long {
  color: rgb(166, 226, 46);
}

.string {
  color: rgb(253, 151, 31);
}

.object {
  color: rgb(249, 38, 114);
}

.array {
  color: rgb(102, 217, 239);
}

.any {
  color: rgb(249, 248, 245);
}
